package de.baumann.browser.activitys.oc

import android.content.Context
import android.content.Intent
import de.baumann.browser.R
import de.baumann.browser.base.BaseOdinActivity
import de.baumann.browser.base.BasePresenter
import de.baumann.browser.iview.IBaseView
import de.baumann.browser.utils.web3j.OdinWallet
import de.baumann.browser.views.dialog.OcWalletAgreementDialog
import kotlinx.android.synthetic.main.activity_oc_wallet.*
import kotlinx.android.synthetic.main.include_tool_bar.*
import kotlinx.android.synthetic.main.whitelist.*

class OcWalletActivity : BaseOdinActivity<IBaseView, BasePresenter<IBaseView>>() {

    companion object {
        fun startOcWalletActivity(context: Context) {
            context.startActivity(Intent(context, OcWalletActivity::class.java))
        }
    }

    override fun getLayout(): Int {
        OdinWallet.addAtivity(this)
        return R.layout.activity_oc_wallet
    }

    override fun getTitleText(): String {
        return "ODIN钱包"
    }

    override fun initView() {
        initToolbar(commToolBar, commTitle)
        rlOcWalletCreate1.setOnClickListener {
            OcWalletAgreementDialog(mContext).show()
        }
        rlImportWallet1.setOnClickListener {
            ImportWalletActivity.startImportWalletActivity(mContext)
        }
    }

    override fun initData() {
    }

    override fun onDestroy() {
        super.onDestroy()
        OdinWallet.removeActivity(this)
    }

    override fun createPresenter(): BasePresenter<IBaseView>? {
        return null
    }

    override fun createView(): IBaseView? {
        return null
    }

    override fun showBindEth(): Boolean {
        return false
    }
}
